/**
 * Project:   dtu.fmes.googleloon
 * File:      Wind.java
 * License: 
 *            This file is licensed under GNU General Public License version 3
 *            http://www.gnu.org/licenses/gpl-3.0.txt
 *
 * Copyright:	Bartosz Cichecki [ cichecki.bartosz@gmail.com ]
 * 				Nicolai Sonne [ NicolaiSonne@hotmail.com.com ]
 * Date:      Dec 11, 2013
 */

package dtu.fmes.loon.model.environment;

import dtu.fmes.loon.model.Vector;

/**
 * Wind defined by vector
 * 
 * @author Bartosz Cichecki, Nicolai Sonne
 */
public class Wind {

	private Double height;

	private Vector vector;

	public Wind() {

	}

	public Wind(Double height, Vector vector) {
		super();
		this.height = height;
		this.vector = vector;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (getClass() != obj.getClass()) {
			return false;
		}
		Wind other = (Wind) obj;
		if (height == null) {
			if (other.height != null) {
				return false;
			}
		} else if (!height.equals(other.height)) {
			return false;
		}
		if (vector == null) {
			if (other.vector != null) {
				return false;
			}
		} else if (!vector.equals(other.vector)) {
			return false;
		}
		return true;
	}

	public Double getHeight() {
		return height;
	}

	public Vector getVector() {
		return vector;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (height == null ? 0 : height.hashCode());
		result = prime * result + (vector == null ? 0 : vector.hashCode());
		return result;
	}

	public void setHeight(Double height) {
		this.height = height;
	}

	public void setVector(Vector vector) {
		this.vector = vector;
	}

	@Override
	public String toString() {
		return "Wind [height=" + height + ", vector=" + vector + "]";
	}

}
